package com.litchi.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import java.io.Serializable;

/**
 * Created by palad on 2016/5/6.
 */
@Entity
@Data
@NamedQuery(name="Book.findByPrice",query="select name,author,price from Book b where b.price=?1")
public class Book implements Serializable{
    private static final long serialVersionUID = 1L;
    @Id
    long id;
    @Column(name="name")
    String name;
    @Column(name="author")
    String author;
    @Column(name="price")
    long price;
}

